<div class="title"><h5>Управление модулем Гостевая книга</h5></div>


<div class="breadCrumbHolder module">
	<div class="breadCrumb module">
	    <ul>
	        <li class="firstB"><a href="index.php" title="{#MAIN_PAGE#}">{#MAIN_PAGE#}</a></li>
	        <li><a href="index.php?do=modules&amp;cp={$sess}">{#MODULES_SUB_TITLE#}</a></li>
	        <li><a href="index.php?do=modules&action=modedit&mod=guestbook&moduleaction=1&cp={$sess}">Гостевая книга</a></li>
	        {$patch}
	    </ul>
	</div>
</div>




<style>
{literal}
#descr	{display:none}
span.jqTransformCheckboxWrapper {float: left;}
{/literal}
</style>





<div class="widget first">
	<ul class="tabs">
	    <li class="activeTab"><a href="#tab1">Сообщения</a></li>
	    <li class=""><a href="#tab2">Настройки</a></li>
	</ul>



	<div id="tab1" class="tab_content" style="display: block;">
	
		{if $comments_array}

		
			<form action="index.php?do=modules&action=modedit&mod=guestbook&moduleaction=1&cp={$sess}" method="post" name="pp" style="display:inline" class="mainForm">
				<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
					<tr>
						<td class="second">
							<select name="sort" id="sort">
								<option value="desc" {if $smarty.request.sort == desc} selected="selected" {/if}>{#GUEST_SORTBYDESC#}</option>
								<option value="asc" {if $smarty.request.sort == asc} selected="selected" {/if}>{#GUEST_SORTBYASC#}</option>
							</select>
		
							<select name="pp" id="pp">
								{section name=pp loop=95 step=5}
									<option value="{$smarty.section.pp.index+10}" {if $smarty.request.pp == $smarty.section.pp.index+10}selected{/if}>{#GUEST_ON#} {$smarty.section.pp.index+10} {#GUEST_ONPAGE#}</option>
								{/section}
							</select>
		
							&nbsp;&nbsp;&nbsp;<input type="submit" class="basicBtn topDir" value="{#GUEST_B_SORT#}" />
						</td>
					</tr>
				</table>
			</form>
		
			{if $pnav}
				<div class="pagination">
				<ul class="pages">
					{$pnav}
				</ul>
				</div>
			{/if}
			{*{if $item->guestbook_post_approve != 1}style="background-color:#ffcccc"{/if}*}
			<form name="form1" method="post" action="index.php?do=modules&action=modedit&mod=guestbook&moduleaction=medit&cp={$sess}" class="mainForm">
				<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
					{foreach name=ca from=$comments_array item=item}
				<tr>
					<td colspan="4" class="third">
						<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic nobackground" {if $item->guestbook_post_approve != 1}style="border:1px solid red"{/if}>
					
						<tr {if $item->guestbook_post_approve != 1}style="border-top:1px solid red"{/if}>
							<td>{#GUEST_AUTOR_NAME#}</td>
							<td>{#GUEST_AUTOR_EMAIL#}</td>
							<td>Дата создания</td>
							<td>{#GUEST_AUTOR_FROM#}</td>
						</tr>
						<tr>
							<td><div class="pr12"><input name="author[{$item->id}]" type="text" value="{$item->guestbook_post_author_name}" size="30" style="width:100%" /></div></td>
							<td><div class="pr12"><input name="email[{$item->id}]" type="text" value="{$item->guestbook_post_author_email}" size="30" style="width:100%" /></div></td>
							<td><div class="pr12"><input name="data[{$item->id}]" type="text" value="{$item->guestbook_post_created|date_format:"%d.%m.%Y"|pretty_date}" size="30" style="width:100%" /></div></td>
							<td><div class="pr12"><input name="sity[{$item->id}]" type="text" value="{$item->guestbook_post_author_sity}" size="30" style="width:100%" /></div></td>
						</tr>
						<tr>
							<td valign="middle">
								<strong>{#GUEST_TEXT#}</strong><br />
								{$item->guestbook_post_created|date_format:$TIME_FORMAT|pretty_date}<br />
								<br />
								
								
								<input name="del[{$item->id}]" type="checkbox" id="d" value="1" />
								<div style="float: left; margin:6px 0 0 5px;">{#GUEST_DELETE#}</div>
								<div class="clear"></div>
								
								<input name="approve[{$item->id}]" type="checkbox" value="1" {if $item->guestbook_post_approve == 1}checked="checked"{/if}/>
								<div style="float: left; margin:6px 0 0 5px;">Показывать сообщение</div>
								
								{*
								{if $item->guestbook_post_approve != 1}
									<input name="approve[{$item->id}]" type="checkbox" value="1" />
									<div style="float: left; margin:6px 0 0 5px;">{#GUEST_ACTIVE_MESSAGE#}</div>
								{else}
									<input name="approve[{$item->id}]" type="checkbox" value="0" />
									<div style="float: left; margin:6px 0 0 5px;">{#GUEST_INACTIVE_MESSAGE#}</div>
								{/if}
								*}
							</td>
							<td colspan="3"><div class="pr12"><textarea name="post_text[{$item->id}]" cols="50" rows="5" id="post_text[{$item->id}]" style="width:100%">{$item->guestbook_post_text|escape }</textarea></div></td>
						</tr>
						
						<tr class="second" id="table_rows">
							<td valign="middle">Ответ: </td>
							<td colspan="3">
								<textarea name="adm_comment[{$item->id}]" cols="50" rows="2" id="adm_comment[{$item->id}]" style="width:100%">{$item->adm_comment|escape }</textarea>
						</tr>
						
						<tr class="second" id="table_rows">
							<td valign="middle">Имя отвечающего:</td>
							<td colspan="3"><input name="adm_name[{$item->id}]" type="input" style="width:300px" value="{$item->adm_name|escape}" /></td>
						</tr>							
										
						{if $smarty.foreach.ca.iteration%5 == 0}
							<tr>
								<td colspan="4" class="third">
									<input name="Submit" type="submit" class="button" value="{#GUEST_B_CHANGE#}">
								</td>
							</tr>
						{/if}
						
						
						</table>
					</td>
					</tr>						
					{/foreach}

					{if $smarty.foreach.ca.iteration%5 != 0}
						<tr>
							<td colspan="4" class="third">
								<input name="Submit" type="submit" class="basicBtn topDir" value="{#GUEST_B_CHANGE#}">
							</td>
						</tr>
					{/if}
				</table>
			</form>
		
			{if $pnav}
				<div class="pagination">
				<ul class="pages">
					{$pnav}
				</ul>
				</div>
			{/if}
		{else}
		<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
			<tr>
				<td colspan="8">
					<ul class="messages">
						<li class="highlight yellow">Сообщений нету.</li>
					</ul>
				</td>
			</tr>
		</table>
		{/if}
	
	</div>
	
	
	
	
	<div id="tab2" class="tab_content" style="display: block;">
	
		<form name="form2" method="post" action="index.php?do=modules&action=modedit&mod=guestbook&moduleaction=1&sub=save&cp={$sess}" class="mainForm">
			<table cellpadding="0" cellspacing="0" width="100%" class="tableStatic">
				<col width="250" class="first" />
				<col class="second" />
				<tr>
				  <td width="200" class="first"><strong>Тизер раздела</strong></td>
				  <td class="second">{$desrc}</td>
				</tr>
				<tr>
					<td>{#GUEST_MAXLENGHT#}</td>
					<td><input name="post_max_length" type="text" value="{$settings.guestbook_post_max_length}" /></td>
				</tr>
				<tr>
					<td>{#GUEST_SPAM#}</td>
					<td><input name="antispam" type="checkbox" value="1" {if $settings.guestbook_antispam==1}checked="checked" {/if}/></td>
				</tr>
				<tr>
					<td>{#GUEST_SPAM_TIME#}</td>
					<td><input name="antispam_time" type="text" value="{$settings.guestbook_antispam_time}" /></td>
				</tr>
				<tr>
					<td>{#GUEST_MUST_CENSORED#}</td>
					<td><input name="need_approve" type="checkbox" value="1" {if $settings.guestbook_need_approve==1}checked="checked" {/if}/></td>
				</tr>
				<tr>
					<td>{#GUEST_MESSAGE_EMAIL#}</td>
					<td><input name="send_copy" type="checkbox" value="1" {if $settings.guestbook_send_copy==1}checked="checked" {/if}/></td>
				</tr>
				<tr>
					<td>{#GUEST_MAILSEND#}</td>
					<td><input name="email_copy" type="text" value="{$settings.guestbook_email_copy}" /></td>
				</tr>
				<tr>
					<td>{#GUEST_ENABLE_BBCODE#}</td>
					<td><input name="use_bbcode" type="checkbox" value="1" {if $settings.guestbook_use_bbcode==1}checked="checked" {/if}/></td>
				</tr>
				<tr>
					<td colspan="2" class="third">
						<input name="Submit" type="submit" class="basicBtn topDir" value="{#GUEST_B_SAVE#}">
					</td>
				</tr>
			</table>
		</form>
	
	
	</div>



</div>



